package com.guigu.serviceorder.service;

import com.guigu.serviceorder.entity.TbCategory;
import com.guigu.serviceorder.entity.TbOrderItem;
import com.guigu.serviceorder.entity.TbSku;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Component
@FeignClient("service-goods")
public interface GoodsService {

    @GetMapping("/servicegoods/category/findById2")
    public TbCategory findByCategoryId(@RequestParam("id") Integer id);

    @GetMapping("/servicegoods/tbsku/findById2")
    public TbSku findBySkuId(@RequestParam("id") String id);

    @PostMapping("/servicegoods/tbsku/deductionStock")
    public boolean deductionStock(@RequestBody List<TbOrderItem> oderItemList);
}
